*Replication Files for "The Three R's of CEDAW Commitment: Ratification, Reservation, and Rejection"

*Load data file
use "KMReplication.dta"

*Table 1: CEDAW Commitment Levels (State Years, 1980-2022)
*0 means no CEDAW ratification, 1 means CEDAW ratification with reservatinos, and 2 means CEDAW ratification without reservations
tab cedawnew

*Table 2: Women's Rights in CIRIGHTS Data 
*Each variable is an ordinal scale from no rights (zero), to some unenforced rights (one), to some enforced rights (two), to full rights (three).  
tab WOPOL
tab wosoc_p
tab WECON

*Table 3: Baseline Models for CEDAW Commitments and Women's Rights 
*Estimating Baseline Ordered Logit Model without control variables (adding year & clustering by ccode) for Women's Political Rights (CIRIGHTS as source)
ologit WOPOL fully_ratified ratified_with_reservations year, cluster (ccode)
estimate store B1, title(PoliticalBasicLogit)

*Estimating Baseline xtreg Model without control variables (adding year & clustering by ccode) for Women's Social Rights (V-Dem measure of women's civil liberties index)
xtreg WOSOC fully_ratified ratified_with_reservations year, cluster(ccode)
estimate store B2, title(SocialBasicLogit)

*Estimating Baseline Ordered Logit Model without control variables (adding year & clustering by ccode) for Women's Economic Rights (CIRIGHTS as source)
ologit WECON fully_ratified ratified_with_reservations year, cluster(ccode)
estimate store B3, title(EconBasicLogit)

esttab B* using "BasicOL.rtf", se(3) b(3) scalars(F df_m df_r r2) sfmt(2) label compress noomitted ///
nobaselevels title(Table 1) replace

*Table 4: Full Models for CEDAW Commitments and Women's Rights
*Estimating Full Ordered Logit Model for Women's Political Rights (CIRIGHTS as source)
ologit WOPOL fully_ratified ratified_with_reservations year wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic, cluster(ccode)
estimate store W1, title(PoliticalRights)

*Estimating Full Ordered Logit Model for Women's Social Rights (V-Dem measure of women's civil liberties index)
xtreg WOSOC fully_ratified ratified_with_reservations year wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic, cluster(ccode)
estimate store W2, title(SocialRights)

*Estimating Full Ordered Logit Model for Women's Economic Rights (CIRIGHTS as source)
ologit WECON fully_ratified ratified_with_reservations year wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic, cluster(ccode)
estimate store W3, title(EconomicRights)

esttab W* using "WomensRights3.rtf", se(3) b(3) scalars(F df_m df_r r2) sfmt(2) label compress noomitted ///
nobaselevels title(Table 1) replace 

*Figure 1: Substantive Effects of CEDAW Ratification Levels on Women's Political Rights
xi: ologit WOPOL cedawnew year wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic, cluster(ccode)
margins, at(cedawnew=(0/2)) predict(outcome(0)) atmeans saving(file1, replace)
margins, at(cedawnew=(0/2)) predict(outcome(1)) atmeans saving(file2, replace)
margins, at(cedawnew=(0/2)) predict(outcome(2)) atmeans saving(file3, replace) 
margins, at(cedawnew=(0/2)) predict(outcome(3)) atmeans saving(file4, replace)
combomarginsplot file1 file2 file3 file4, labels("No Rights" "Some Unenforced Rights" "Some Enforced Rights" "Full Rights") scheme(s2color) horizontal recastci(rspike) 
*Note: version in paper was modified using the graph editor in stata to remove connecting lines.

*Figure 2: Substantive Effects of CEDAW Ratification Levels on Women's Social Rights 
xi: xtreg WOSOC fully_ratified ratified_with_reservation year wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic, cluster(ccode)
margins, at(fully_ratified==0 ratified_with_reservation==0) saving(file5, replace)
margins, at(fully_ratified==0 ratified_with_reservation==1) saving(file6, replace)
margins, at(fully_ratified==1 ratified_with_reservation==0) saving(file7, replace)
combomarginsplot file5 file6 file7, labels("No Ratification" "Ratified with Reservations" "Ratified without Reservations") scheme(s2color) horizontal recastci(rspike) 
*Note: version in paper was modified using the graph editor in stata to remove connecting lines.

*Figure 3: Substantive Effects of CEDAW Ratification Levels on Women's Economic Rights
xi: ologit WECON cedawnew year wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic, cluster(ccode)
margins, at(cedawnew=(0/2)) predict(outcome(0)) atmeans saving(file9d, replace)
margins, at(cedawnew=(0/2)) predict(outcome(1)) atmeans saving(file10d, replace)
margins, at(cedawnew=(0/2)) predict(outcome(2)) atmeans saving(file11d, replace)
margins, at(cedawnew=(0/2)) predict(outcome(3)) atmeans saving(file12d, replace)

combomarginsplot file9d file10d file11d file12d, labels("No Rights" "Some Unenforced Rights" "Some Enforced Rights" "Full Rights") scheme(s2color) horizontal recastci(rspike)

*Figure 4a-Figure 4c
use "combinedtimeseries.dta"

*Figure 4a
tsline WOPOLFully WOPOLRes WOPOLNoRat if year<2020
*Figure 4b
tsline WOSOCFully WOSOCRes WOSOCNoRat if year<2022
*Figure 4c
tsline WECONFully WECONRes WECONNoRat if year<2020

*Load data file
use "KMReplication.dta"

*Table 5: Heckman Selection Models of CEDAW Commitments and Women's Rights
heckman WOPOL ratified_with_reservations year wcso lnpop polity4 common civil islamic rgdpe_pc, sel(cedawnew= year wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic)
estimate store H1, title(PoliticalHeckman)
heckman WOSOC ratified_with_reservations year wcso lnpop polity4 common civil islamic rgdpe_pc, sel(cedawnew= year wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic)
estimate store H2, title(SocialHeckman)
heckman WECON ratified_with_reservations year wcso lnpop polity4 common civil islamic rgdpe_pc, sel(cedawnew= year wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic)
estimate store H3, title(EconHeckman)

esttab H* using "HeckmanModels2.rtf", se(3) b(3) scalars(F df_m df_r r2) sfmt(2) label compress noomitted ///
nobaselevels title(Table 2) replace

*Table 6:
ttest WOPOL if cedawrat==1, by(art1)
ttest WOPOL if cedawrat==1, by(art2)
ttest WOPOL if cedawrat==1, by(art5)
ttest WOPOL if cedawrat==1, by(art7)
ttest WOPOL if cedawrat==1, by(art9)
ttest WOPOL if cedawrat==1, by(art10)
ttest WOPOL if cedawrat==1, by(art11)
ttest WOPOL if cedawrat==1, by(art13)
ttest WOPOL if cedawrat==1, by(art15)
ttest WOPOL if cedawrat==1, by(art16)
ttest WOPOL if cedawrat==1, by(art28)
ttest WOPOL if cedawrat==1, by(art29)
*Difference of means tests for social rights
ttest WOSOC if cedawrat==1, by(art1)
ttest WOSOC if cedawrat==1, by(art2)
ttest WOSOC if cedawrat==1, by(art5)
ttest WOSOC if cedawrat==1, by(art7)
ttest WOSOC if cedawrat==1, by(art9)
ttest WOSOC if cedawrat==1, by(art10)
ttest WOSOC if cedawrat==1, by(art11)
ttest WOSOC if cedawrat==1, by(art13)
ttest WOSOC if cedawrat==1, by(art15)
ttest WOSOC if cedawrat==1, by(art16)
ttest WOSOC if cedawrat==1, by(art28)
ttest WOSOC if cedawrat==1, by(art29)
*Difference of means tests for ecnoomic rights
ttest WECON if cedawrat==1, by(art1)
ttest WECON  if cedawrat==1, by(art2)
ttest WECON  if cedawrat==1, by(art5)
ttest WECON  if cedawrat==1, by(art7)
ttest WECON  if cedawrat==1, by(art9)
ttest WECON  if cedawrat==1, by(art10)
ttest WECON  if cedawrat==1, by(art11)
ttest WECON  if cedawrat==1, by(art13)
ttest WECON  if cedawrat==1, by(art15)
ttest WECON  if cedawrat==1, by(art16)
ttest WECON  if cedawrat==1, by(art28)
ttest WECON  if cedawrat==1, by(art29)

*Appendix Models

*Load data
use "combinedtimeserieslowgroup.dta"

*Figure A1a: Women's Political Rights for Low Women's Rights States in 1981
tsline WOPOLFully WOPOLRes WOPOLNoRat if year<2020
*Figure A1b: Women's Social Rights for Low Women's Rights States in 1981
tsline WOSOCFully WOSOCRes WOSOCNoRat if year<2022
*Figure A1c: Women's Economic Rights for Low Women's Rights States in 1981
tsline WECONFully WECONRes WECONNoRat if year<2020

*Load data
use "combinedtimeserieshighgroup.dta"

*Figure A2a: Women's Political Rights for High Women's Rights States in 1981
tsline WOPOLFully WOPOLRes WOPOLNoRat if year<2020
*Figure A2b: Women's Social Rights for High Women's Rights States in 1981
tsline WOSOCFully WOSOCRes WOSOCNoRat if year<2020
*Figure A2c: Women's Economic Rights for High Women's Rights States in 1981
tsline WECONFully WECONRes WECONNoRat if year<2020

*Table A1: Instrumental Variables Model with CAT Ratification as Instrument
*Load data file
use "KMReplication.dta"

ivregress 2sls WOPOL wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic year (fully_ratified = cat_rat)
estimate store I1, title(IVPoliticalRights)
estat firststage
ivregress 2sls WOSOC wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic year (fully_ratified = cat_rat)
estimate store I2, title(IVSocialRights)
estat firststage
ivregress 2sls WECON wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic year (fully_ratified = cat_rat)
estimate store I3, title(IVEconomicRights)
estat firststage
*Output of Models
esttab I* using "IVWomensRights.rtf", se(3) b(3) scalars(F df_m df_r r2) sfmt(2) label compress noomitted ///
nobaselevels title(Table 1) replace

*Table A2: Descriptive Statistics for Dependent Variables
sum WOPOL WOSOC WECON

*Table A3: Full Models, Adding Declarations
ologit WOPOL fully_ratified ratified_with_reservations declarations wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic year, cluster(ccode)
estimate store W1, title(PoliticalRights)
xtreg WOSOC fully_ratified ratified_with_reservations declarations wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic year, cluster(ccode)
estimate store W2, title(SocialRights)
ologit WECON fully_ratified ratified_with_reservations declarations wcso civtot2 inttot2 lnpop polity4 rgdpe_pc common civil islamic year, cluster(ccode)
estimate store W3, title(EconomicRights)

*Output of Models
esttab W* using "WomensRights3.rtf", se(3) b(3) scalars(F df_m df_r r2) sfmt(2) label compress noomitted ///
nobaselevels title(Table 1) replace

*Load data file
use "KMReplication2.dta"
*Table A4: Heckman Probit Selection Model of CEDAW Commitments and Reservations
heckprob artsum2 wcso rgdpe_pc lnpop polity4 common civil islamic year, sel(ratification= wcso rgdpe_pc lnpop polity4 common civil islamic civtot2 inttot2 year)